package 一六;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.Vector;

/**
 * Created by lenovo on 2017/3/15.
 */
public class q10 {


    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int[] flag = new int[10];
        Set<Integer> set = new HashSet<>();
        Vector<Integer> result = new Vector<>();

        for(int i=0;i<10;i++){
            flag[i] = -1;
        }

        int n = scanner.nextInt();
        scanner.nextLine();

        int[] num= new int[n];
        for(int i=0;i<n;i++){
            num[i] = scanner.nextInt();
        }
        scanner.nextLine();

        for(int i =0;i<n;i++){
             if(flag[num[i]]>-1){
                 for(int j =flag[num[i]]+1;j<i;j++){
                     set.add(num[j]);
                 }
                 result.add(set.size());
                 set.clear();
             }else{
                 result.add(-num[i]);
             }
            flag[num[i]] = i;
        }

        for(int i=0;i<result.size();i++){
            System.out.print(result.elementAt(i) + " ");
        }
    }
}
